package com.example.anno;


import com.example.validation.StateValidator;
import jakarta.validation.Constraint;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = StateValidator.class)
public @interface State {
    String message() default "状态格式不正确,state只能是草稿或已发布";
    Class<?>[] groups() default {};
    Class<?>[] payload() default {};
}
